<template>
  <div class="count">
    关于actions的映射使用
    <br>
    count:{{$store.state.count.count}}
    <br>
    关于state和actions映射的使用
    <br>
    {{name}}:{{count}}
    <br>
    <button @click="add">增加</button>
    <button @click="reduce">减少</button>
  </div>
</template>
<script>
  import {mapActions,mapState} from "vuex"
  export default {
    name:"Count",
    computed:mapState('count',['count','name']),
    methods:mapActions('count',['add','reduce'])
  }
</script>
<style>

</style>
